<?php

namespace app\api\service;

use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;

interface StudentService
{
    /**
     * 获取所有学生信息
     * @return bool|string
     * @throws DataNotFoundException
     * @throws DbException
     * @throws ModelNotFoundException
     */
    public function getAllStudent(): bool|string;

    /**
     * 根据id获取学生信息
     * @return bool|string
     * @throws DataNotFoundException
     * @throws DbException
     * @throws ModelNotFoundException
     */
    public function getStudentById(): bool|string;

    /**
     * 添加学生信息
     * @return bool|string
     */
    public function addStudent(): bool|string;

    /**
     * 更新学生信息
     * @return bool|string
     * @throws DataNotFoundException
     * @throws DbException
     * @throws ModelNotFoundException
     */
    public function updateStudent(): bool|string;

    /**
     * 删除学生信息
     * @return bool|string
     */
    public function deleteStudent(): bool|string;
}